Write-Host "正在启动 Ketang PC 开发环境..." -ForegroundColor Green
Write-Host ""

# 设置环境变量来抑制警告
$env:NODE_NO_WARNINGS = "1"
$env:NODE_OPTIONS = "--no-deprecation"

Write-Host "环境变量已设置:" -ForegroundColor Yellow
Write-Host "NODE_NO_WARNINGS: $env:NODE_NO_WARNINGS" -ForegroundColor Cyan
Write-Host "NODE_OPTIONS: $env:NODE_OPTIONS" -ForegroundColor Cyan
Write-Host ""

Write-Host "启动开发环境..." -ForegroundColor Green
Write-Host ""

try {
    npm run dev
} catch {
    Write-Host "启动失败，请检查错误信息" -ForegroundColor Red
    Write-Host $_.Exception.Message -ForegroundColor Red
}

Write-Host ""
Write-Host "按任意键退出..." -ForegroundColor Cyan
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
